package com.ruoyi;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.generator.domain.GenTable;

import cn.hutool.core.io.file.FileReader;

/**
 * 
* @ClassName: HealthAskController 
* @Description: TODO(用于K8S健康检测) 
* @author 晏大兵 
* @date 2025年2月16日 上午1:11:05 
*
 */
@RestController
@RequestMapping("/health")
public class HealthAskController extends BaseController{
	
	private static final Logger LOG = LoggerFactory.getLogger(HealthAskController.class);
	
	
    @GetMapping("/ask")
    public String ask(GenTable genTable){
    	LOG.error("健康检测完成.");
    	FileReader fileReader = new FileReader("/app/code/serverName.txt");
    	String result = fileReader.readString();
        return "server is ok | serverName["+ result +"]";
    }

   
}
